Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

279
Views
How to override javascript function "_title_changed" in webclient odoo

My goal is to change the Page title using the company name. I am trying to change the function but still there's no effect. Any idea on how to achieve this?

var session = require('web.session');
var AbstractWebClient = require('web.AbstractWebClient');

AbstractWebClient.include({
    _title_changed: function () {
        this._super();
        var company_name = session.user_companies.current_company[1];
        document.title = company_name;
        console.log('_title_changed function');
    },
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

What I am lacking was odoo.define().

This is what I did:

odoo.define('my_module.AbstractWebClient', function (require) {
    "use strict";
    
/**
 * AbstractWebClient Override Method for Page Title
 */

var session = require('web.session');
var AbstractWebClient = require('web.AbstractWebClient');

AbstractWebClient.include({
    _title_changed: function () {
        this._super();
        var company_name = session.user_companies.current_company[1];
        document.title = company_name;
        console.log('_title_changed function');
    },
});

return AbstractWebClient;

});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!